package com.project.bean;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 用户表实体类
 */

@Data
@Api(tags = "用户视图")
@TableName(value = "sys_user")
public class UserBean {

    @ApiModelProperty(value = "编号",hidden = true)
    @TableId(value = "pk_userId")
    private int id;

    @ApiModelProperty(value = "用户名")
    @TableField(value = "userName")
    private String userName;

    @ApiModelProperty(value = "用户真实姓名")
    @TableField(value = "realName")
    private String realName;

    @ApiModelProperty(value = "用户密码")
    @TableField(value = "userPwd")
    private String userPwd="111";

    @TableField(exist = false)
    private List<RoleBean>roleList;
//    @TableField(exist = false)
//    private List<PurchaseBean>purchaseList;
//    @TableField(exist = false)
//    private List<SellBean>sellList;
    @TableField(exist = false)
    private List<GradeBean> gradeList;
    @TableField(exist = false)
    private List<PurchaseBean> purchaseList;
    @TableField(exist = false)
    private List<SellBean> sellList;

    public UserBean() {
    }

    public UserBean(String userName, String realName) {
        this.userName = userName;
        this.realName = realName;
    }
}
